<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单行的回文数检查</title>
</head>
<body>
    <script>
        function checkPalindrome(str) {
            return str == str.split('').reverse().join('');
        }
        let r=checkPalindrome('naman');
        console.log('%c   r: ','color: MidnightBlue; background: Aquamarine; font-size: 20px;', r);
        // 输出: true

    </script>
</body>
</html>